package com.dl698.axdr;

/**
 * AppUnitChoice枚举
 * 定义应用单元选择的枚举值
 */
public enum AppUnitChoice {
    _ERR_NONE_SELECTED(-1),
    APP_UNIT_PALIN(0),
    APP_UNIT(1),
    DAR(2);

    private final int value;

    AppUnitChoice(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static AppUnitChoice fromValue(int value) {
        for (AppUnitChoice choice : AppUnitChoice.values()) {
            if (choice.value == value) {
                return choice;
            }
        }
        return _ERR_NONE_SELECTED;
    }
}